<%--
  Created by IntelliJ IDEA.
  User: imac
  Date: 2020/2/26
  Time: 5:17 下午
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ page import="java.util.List" %>
<%@ page import="com.foreknow.model.Guestbook" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%@taglib prefix="pager" uri="http://blog.zjjlive.net/zjjlive/tags/pager" %>

<%
    String path = request.getContextPath();
%>

<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/bootstrap.min.css">
</head>
<body>
<div class="container">
    username:${sessionScope.admin.username}
    <table class="table table-hover">
        <tr>
            <td>id</td>
            <td>name</td>
            <td>phone</td>
            <td>email</td>
            <td>title</td>
            <td>content</td>
            <td>createtime</td>
            <td>操作</td>
        </tr>
        <c:forEach var="gb" items="${list}" varStatus="status">
            <tr>
                <td>${status.index+1}</td>
                <td>${gb.name}</td>
                <td>${gb.phone}</td>
                <td>${gb.email}</td>
                <td>${gb.title}</td>
                <td>${gb.content}</td>
                <td>${gb.createdtime}</td>
                <td>
                    <a href="###" class="btn btn-primary">修改</a>
                    <a href="<%=path%>/user/manager?id=${gb.id}&q=delete" class="btn btn-danger">删除</a>
                </td>
            </tr>
        </c:forEach>
    </table>
    <div>
        <pager:pager pageNo="${requestScope.pageNo}" recordCount="${requestScope.total}" pageSize="${initParam.pageSize}" url="/JavaWebDemo/user/manager?q=list"/>
    </div>
</div>
</body>
</html>